<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('登录')"/>
    <style>
        body{
            background-image: url("../img/login.jpeg");
        }
        .login-ruleForm {
            position: absolute;
            width: 400px;
            height: 300px;
            background-color: #FFFFFF;
            border-radius: 6px;
            padding: 50px 50px 0 0;
            left: 50%;
            top: 50%;
            margin-left: -200px;
            margin-top: -150px;
            box-shadow: #8c939d;
        }
        #login-btn {
            width: 100%;
        }

        #code-input{
            width: 200px;
        }
        #code-img {
            float: right;
        }
    </style>
</head>
<body>
<div id="app">
    <el-form :model="ruleForm" status-icon :rules="rules" ref="ruleForm" label-width="100px" class="login-ruleForm">
        <el-form-item prop="loginName" label-width="20px">
            <el-input v-model="ruleForm.loginName" placeholder="用户名" prefix-icon="el-icon-user-solid"></el-input>
        </el-form-item>
        <el-form-item prop="password" label-width="20px">
            <el-input type="password" v-model="ruleForm.password" autocomplete="off" placeholder="密码" prefix-icon="el-icon-lock"></el-input>
        </el-form-item>
        <el-form-item prop="code" label-width="20px">
            <el-row type="flex" justify="space-between">
                <el-col :span="12">
                    <el-input type="code" v-model="ruleForm.code" autocomplete="off" placeholder="验证码" prefix-icon="el-icon-help" id="code-input"></el-input>
                </el-col>
                <el-col :span="10">
                    <img :src="captchaUrl" @click="refreshCode" width="130px" height="48px"  alt="点击刷新验证码" id="code-img"/>
                </el-col>
            </el-row>
        </el-form-item>
        <el-form-item label-width="20px">
            <el-button type="primary" @click="login('ruleForm')" id="login-btn">登录</el-button>
        </el-form-item>
    </el-form>
</div>
<th:block th:include="include :: footer"/>
<script th:src="@{/pageVue/login.js}"></script>
</body>
</html>